class Filter:
    def __init__(self, next_filter=None):
        self.next_filter = next_filter

    def process(self, data):
        if self.next_filter:
            return self.next_filter.process(data)
        return data
